﻿
@{
    ViewBag.Title = "EmployeePageList";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css{
    <link rel="stylesheet" href="~/assets/portal/assets/css/common.css" />
    <link rel="stylesheet" href="~/bussiness/js/base/reset.css" />
    <style>
        .ant-select-arrow, .ant-select-clear {
            position: absolute;
            right: 10px;
        }

        .stitle {
            font-size: 16px;
            font-weight: 600;
            color: #424758;
            display: flex;
            margin: 6px 0;
            align-items: center;
        }

        .simg :hover {
            cursor: pointer
        }

        .css-dev-only-do-not-override-19iuou.ant-table-wrapper table tr > * {
            padding: 4px !important;
        }

        .css-dev-only-do-not-override-19iuou.ant-table-wrapper .ant-table-thead > tr > th, .css-dev-only-do-not-override-19iuou.ant-table-wrapper .ant-table-tbody > tr > td, .css-dev-only-do-not-override-19iuou.ant-table-wrapper tfoot > tr > th, .css-dev-only-do-not-override-19iuou.ant-table-wrapper tfoot > tr > td {
            padding: 4px
        }

        .stitle::before {
            content: "";
            margin-right: 10px;
            display: inline-block;
            width: 4px;
            height: 18px;
            background: #0064E5;
        }

        svg {
            fill: red !important;
        }
    </style>
}
<div id="SEList" class="font-['SourceHanSansSC']">
    <a-style-provider hash-priority="high">
        <a-config-provider :locale="vlocale">

            <header class="px-5 box-border">
                <div class="flex items-center relative">
                    <div class="w-full h-[48px] text-[13px]  rounded-lg mx-auto mt-[10px]  bg-white  text-[#888888] text-3xl flex items-center px-10">
                        <div class="w-22 h-22 bg-blue-200 mr-5"> <img class="w-full h-full cursor-pointer" v-on:click="SEListParams.vvback()" src="~/Assets/nimgs/exit.png" alt="返回" /></div>
                        <span class="text-[]">设备设施<span class="mx-2">/</span><span class="text-[#424758] text-[15px]">特种设备</span> </span>
                    </div>
                </div>
                <m-image-model></m-image-model>
                <m-pdf-pop-model></m-pdf-pop-model>
                <a-spin :spinning="SEListParams.uploadLock.value" tip="加载中，请耐心等待..." />
                        <div class="w-full h-min-[108px] bg-white" style="padding: 20px 30px 10px; box-sizing: border-box ;border-radius:6px">
                            <div class="mb-5 text-[16px] font-bold text-black">筛选条件</div>
                   
                            <a-form layout="inline" :model="SEListParams.queryParams.value">

                                <a-form-item label="使用部门：">
                                    <a-input allow-clear
                                             placeholder="请填写使用部门"
                                             v-model:value="SEListParams.queryParams.value.UseDepartment"
                                             style="width: 200px;"></a-input>
            
                                </a-form-item>
                                <a-form-item label="设备种类：">
                                    <a-select show-search
                                              allow-clear
                                              style="width: 200px;"
                                              :filter-option="SEListParams.filterOption"
                                              placeholder="请选择设备种类"
                                              v-model:value="SEListParams.queryParams.value.DeviceTypeId"
                                              :options="SEListParams.eqtype1List.value">
                                    </a-select>
                                </a-form-item>



                                <a-form-item label="危险点标识：">
                                    <a-radio-group v-model:value="SEListParams.queryParams.value.IsDanger">
                                        <a-radio :value="null">
                                            全部
                                        </a-radio>
                                        <a-radio :value="true">是</a-radio>
                                        <a-radio :value="false">否</a-radio>

                                    </a-radio-group>
                                </a-form-item>
                                <a-form-item label="是否已送检：">
                                    <a-radio-group v-model:value="SEListParams.queryParams.value.IsRepair">
                                        <a-radio :value="null">
                                            全部
                                        </a-radio>
                                        <a-radio :value="true">是</a-radio>
                                        <a-radio :value="false">否</a-radio>

                                    </a-radio-group>
                                </a-form-item>

                                <a-form-item label="设备类别：">
                                    <a-select show-search
                                              allow-clear
                                              style="width: 200px;"
                                              :filter-option="SEListParams.filterOption"
                                              placeholder="请选择设备类别"
                                              v-model:value="SEListParams.queryParams.value.DeviceCategory"
                                              :options="SEListParams.eqtype2List.value">
                                    </a-select>
                                </a-form-item>
                                @*<a-form-item label="设备品种：">
                                    <a-select show-search
                                              allow-clear
                                              style="width: 200px;"
                                              :filter-option="SEListParams.filterOption"
                                              placeholder="请选择设备品种"
                                              v-model:value="SEListParams.queryParams.value.DeviceKindId"
                                              :options="SEListParams.eqtype3List.value">
                                    </a-select>
                                </a-form-item>*@
                                <a-form-item label="设备状态：">
                                    <a-select show-search
                                              allow-clear
                                              style="width: 200px;"
                                              :filter-option="SEListParams.filterOption"
                                              placeholder="请选择设备状态"
                                              v-model:value="SEListParams.queryParams.value.DeviceStatus"
                                              :options="SEListParams.eqstatusList.value">
                                    </a-select>
                                </a-form-item>


                                <a-form-item label="设备编码：">
                                    <a-input allow-clear
                                             placeholder="请填写设备编码"
                                             v-model:value="SEListParams.queryParams.value.DeviceNo"
                                             style="width: 200px;"></a-input>
                                </a-form-item>
                                <a-form-item label="预警级别：">
                                    <a-select show-search
                                              allow-clear
                                              style="width: 200px;"
                                              :filter-option="SEListParams.filterOption"
                                              placeholder="请选择预警级别"
                                              v-model:value="SEListParams.queryParams.value.warningLevel"
                                              :options="SEListParams.levelList.value">
                                    </a-select>
                                </a-form-item>
                                <a-form-item>
                                    <a-button v-on:click="SEListParams.getTableList(true)" type="primary">查询</a-button>
                                </a-form-item>
                                <a-form-item>
                                    <a-button v-on:click="SEListParams.handleReset">重置</a-button>
                                </a-form-item>


                            </a-form>
                  
               
              

                            <div class="flex w-full mt-6">
                                <a-card :bordered="true" class="w-full">
                                    <template #title>
                                        <div class="w-full flex justify-between items-center">
                                            <div class="flex items-center"> <div class="ml-7"><a-tag color="#108ee9">总数:{{ SEListParams.pagination.value.total }}</a-tag></div></div>
                                            <a-space>
                                                @*<a-upload action="#"
                              :show-upload-list="false"
                              v-on:change="($event)=>SEListParams.handleImport($event,0)">
                        <a-button style="background: #40c46d" type="primary">导入(老)</a-button>
                    </a-upload>*@
                                                <a-upload action="#"
                                                          :show-upload-list="false"
                                                          v-on:change="($event)=>SEListParams.handleImport($event,1)">
                                                    <a-button style="background: #40c46d" type="primary">导入</a-button>
                                                </a-upload>
                                                <a-button v-on:click="SEListParams.handleExport()" style="background: #f6b80f" type="primary">导出</a-button>
                                                <a-button v-on:click="SEListParams.toAdd()" type="primary">新增</a-button>
                                            </a-space>
                                        </div>
                                    </template>
                                    <a-table :scroll="{ x: 1200}"  v-on:change="SEListParams.handleTableChange" row-key="Id" :row-selection="SEListParams.rowSelection" :loading="SEListParams.pagination.value.loading" :pagination="SEListParams.pagination.value" :data-source="SEListParams.dataSource.value" :columns="SEListParams.columns.value">
                                    </a-table>

                                </a-card>
                            </div>
                        </div>

                    @*</a-tab-pane>
                </a-tabs>*@
                
                <a-modal v-model:open="SEListParams.popShow.value" :mask-closable="false" width="45%" :ok-text="SEListParams.popType.value==9?'关闭':'保存'" :title="SEListParams.popType.value?{1:`设备编辑`,9:`设备详情`}[SEListParams.popType.value]:`新增设备`" v-on:ok="SEListParams.handleOk">
                    <a-spin :spinning="SEListParams.uploadLock.value" tip="加载中，请耐心等待..." />
                    <div class="stitle">基本信息</div>
                    <a-row>
                        <a-col :span="24">
                            <a-form  ref="formRef" :hide-required-mark="SEListParams.popType.value==9" :model="SEListParams.formData.value" scroll-to-first-error :rules="SEListParams.formRules.value" :label-col="{ span:10 }" :wrapper-col="{ span: 18 }">
                                <div style="display:flex;justify-content:space-around">
                                    <div>
                                        <a-form-item label="设备种类：" name="DeviceTypeId">
                                            <a-select show-search
                                                      allow-clear
                                                      :disabled="SEListParams.popType.value==9"
                                                      style="width: 200px;"
                                                      :filter-option="SEListParams.filterOption"
                                                      placeholder="请选择设备种类"
                                                      v-model:value="SEListParams.formData.value.DeviceTypeId"
                                                      :options="SEListParams.eqtype1List.value">
                                            </a-select>
                                        </a-form-item>
                                        <a-form-item label="设备类别：">
                                            <a-select show-search
                                                      allow-clear
                                                      :disabled="SEListParams.popType.value==9"
                                                      style="width: 200px;"
                                                      :filter-option="SEListParams.filterOption"
                                                      placeholder="请选择设备类别"
                                                      v-model:value="SEListParams.formData.value.DeviceCategory"
                                                      :options="SEListParams.eqtype2List.value">
                                            </a-select>
                                        </a-form-item>
                                        <a-form-item label="设备名称：" name="DeviceName">
                                            <a-input allow-clear placeholder="请填写设备名称" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.DeviceName"></a-input>
                                        </a-form-item>
                                        <a-form-item label="注册代码：">
                                            <a-input allow-clear placeholder="请填写注册代码" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.RegisterCode"></a-input>
                                        </a-form-item>
                                        <a-form-item label="设备编码：">
                                            <a-input allow-clear placeholder="请填写设备编码" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.DeviceNo"></a-input>
                                        </a-form-item>
                                        <a-form-item label="出厂编号：">
                                            <a-input allow-clear placeholder="请填写出厂编号" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.BirthNo"></a-input>
                                        </a-form-item>
                                        <a-form-item label="责任人：" name="ResponsibleEmployee">
                                            <a-input allow-clear placeholder="请填写责任人" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.ResponsibleEmployee"></a-input>
                                        </a-form-item>
                                        <a-form-item label="现场负责人：" name="OnSiteEmployee">
                                            <a-input allow-clear placeholder="请填写负责人" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.OnSiteEmployee"></a-input>
                                        </a-form-item>

                                        @*<a-form-item label="作业人员(巡检)：">
            <a-input allow-clear placeholder="请填写作业人员" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData1.value.JobTitle"></a-input>
        </a-form-item>

        <a-form-item label="作业人员(维护)：">
            <a-input allow-clear placeholder="请填写作业人员" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData1.value.JobTitle"></a-input>
        </a-form-item>*@
                                        <a-form-item label="危险点标识：">
                                            <a-radio-group :disabled="SEListParams.popType.value==9" :options="SEListParams.IsTrainingList.value" v-model:value="SEListParams.formData.value.IsRepair">
                                            </a-radio-group>
                                        </a-form-item>
                                        <a-form-item label="本次检测时间：">
                                            <a-date-picker :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.LastCheckTime" style="width:200px" />
                                        </a-form-item>
                                    </div>
                                    <div>
                                        <a-form-item label="设备状态：" name="DeviceStatus">
                                            <a-select show-search
                                                      allow-clear
                                                      :disabled="SEListParams.popType.value==9"
                                                      style="width: 200px;"
                                                      :filter-option="SEListParams.filterOption"
                                                      placeholder="请选择设备状态"
                                                      v-model:value="SEListParams.formData.value.DeviceStatus"
                                                      :options="SEListParams.eqstatusList.value">
                                            </a-select>
                                        </a-form-item>
                                        <a-form-item label="设备品种：" name="DepartmentId">
                                            <a-select show-search
                                                      allow-clear
                                                      :disabled="SEListParams.popType.value==9"
                                                      style="width: 200px;"
                                                      :filter-option="SEListParams.filterOption"
                                                      placeholder="请选择设备品种"
                                                      v-model:value="SEListParams.formData.value.DeviceKindId"
                                                      :options="SEListParams.eqtype3List.value">
                                            </a-select>
                                        </a-form-item>
                                        <a-form-item label="使用部门：" name="UseDepartment">

                                            <a-input allow-clear placeholder="请填写使用部门" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.UseDepartment"></a-input>

                                            @*<a-select show-search
                      allow-clear
                      :disabled="SEListParams.popType.value==9"
                      style="width: 200px;"
                      :filter-option="SEListParams.filterOption"
                      placeholder="请选择使用部门"
                      v-model:value="SEListParams.formData.value.UseDepartment"
                      :options="SEListParams.deptList.value">
            </a-select>*@
                                        </a-form-item>
                                        <a-form-item label="使用证号：" name="UseCertificationCode">
                                            <a-input allow-clear placeholder="请填写使用证号" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.UseCertificationCode"></a-input>
                                        </a-form-item>

                                        <a-form-item label="安装地点：" name="InstallPlace">
                                            <a-input allow-clear placeholder="请填写安装地点" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.InstallPlace"></a-input>
                                        </a-form-item>

                                        <a-form-item label="责任部门：" name="ResponsibleDepartment">

                                            <a-input allow-clear placeholder="请填写责任部门" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.ResponsibleDepartment"></a-input>

                                            @*<a-select show-search
                      allow-clear
                      :disabled="SEListParams.popType.value==9"
                      style="width: 200px;"
                      :filter-option="SEListParams.filterOption"
                      placeholder="请选择责任部门"
                      v-model:value="SEListParams.formData.value.ResponsibleDepartment"
                      :options="SEListParams.deptList.value">
            </a-select>*@
                                        </a-form-item>

                                        <a-form-item label="责任人电话：" name="ResponsibleContact">
                                            <a-input allow-clear placeholder="请填写电话" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.ResponsibleContact"></a-input>
                                        </a-form-item>


                                        <a-form-item label="现场负责人电话：" name="OnSiteContact">
                                            <a-input allow-clear placeholder="请填写电话" style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.OnSiteContact"></a-input>
                                        </a-form-item>

                                        @*<a-form-item label="作业人员电话(巡检)：">
            <a-input allow-clear placeholder="请填写电话"  style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData1.value.JobTitle"></a-input>
        </a-form-item>

        <a-form-item label="作业人员电话(维护)：">
            <a-input allow-clear placeholder="请填写电话"  style="width: 200px;" :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData1.value.JobTitle"></a-input>
        </a-form-item>*@
                                        <a-form-item label="是否已送检：">
                                            <a-radio-group :disabled="SEListParams.popType.value==9" :options="SEListParams.IsTrainingList.value" v-model:value="SEListParams.formData.value.IsDanger">


                                            </a-radio-group>
                                        </a-form-item>
                                        <a-form-item label="下次检测时间：">
                                            <a-date-picker :disabled="SEListParams.popType.value==9" v-model:value="SEListParams.formData.value.NextCheckTime" style="width:200px" />
                                        </a-form-item>

                                    </div>

                                </div>
                            </a-form>
                    
                        </a-col>
                    </a-row>

     
                    <div class="stitle">附件</div>
                    <div>
                        <a-upload v-model:file-list="SEListParams.uploadImg.value.fileList"
                                  action="#"
                                  multiple
                                  :item-render="($event)=> SEListParams.itemRender($event)"
                                  v-on:change="SEListParams.handleChange($event)">
                            <a-button v-if="SEListParams.uploadImg.value.fileList.length < 8 && SEListParams.urlinfo.value.type!=9" type="primary">+ 上传附件</a-button>

                        </a-upload>
                    </div>


                </a-modal>
            </header>
        </a-config-provider>
    </a-style-provider>
</div>
@section Js{
    <script src="~/bussiness/js/base/tailwind.js"></script>
    <script type="module">
        import Composition from '../../Bussiness/js/pg/SpecialEquipment/SEList.js?v=@DateTime.Now.ToString("yyyyMMddHHmmss")'
        import localeValues from '../../Bussiness/js/base/es/locale/zh_CN.js'
        singalApp('SEList', Composition, localeValues)
    </script>
}
